var screenArr = [
    {
        url: "/display/data/zhwsxxzhjk/qyylzyzl.json",
        title: "区域医疗资源总览",
        templet: qyylzyzl,
        renderInfo: function (res) {
            const {info} = res;
            autoSetHtml(info);
            const {mqrys, mqrhs, mqrcw} = info;
            $("#mqrys").html(decorate(mqrys));
            $("#mqrhs").html(decorate(mqrhs));
            $("#mqrcw").html(decorate(mqrcw));
            return {};
        }
    },
    {
        url: "/display/data/zhwsxxzhjk/qyylzyzl.json",
        title: "地图",
        templet:qyylzyzlMap,
        renderInfo: async function (res) {
            // renderInfo(res);
            console.log("zhwsxxzhjk.js:22->arguments",arguments);
            console.log("zhwsxxzhjk.js:21->res",res);
            const {data} = res;
            const jsonRes = await axios.get("/display/data/HK.json");
            echarts.registerMap('HK', jsonRes.data);
            let option = {
                title: {
                    text: '香港18区人口密度 （2011）',
                    subtext: '人口密度数据来自Wikipedia',
                    sublink: 'http://zh.wikipedia.org/wiki/%E9%A6%99%E6%B8%AF%E8%A1%8C%E6%94%BF%E5%8D%80%E5%8A%83#cite_note-12'
                },
                tooltip: {
                    trigger: 'item',
                    formatter: '{b}<br/>{c} (p / km2)'
                },
                toolbox: {
                    show: true,
                    orient: 'vertical',
                    left: 'right',
                    top: 'center',
                    feature: {
                        dataView: {readOnly: false},
                        restore: {},
                        saveAsImage: {}
                    }
                },
                visualMap: {
                    min: 800,
                    max: 50000,
                    text: ['High', 'Low'],
                    realtime: false,
                    calculable: true,
                    inRange: {
                        color: ['lightskyblue', 'yellow', 'orangered']
                    }
                },
                series: [
                    {
                        name: '香港18区人口密度',
                        type: 'map',
                        mapType: 'HK', // 自定义扩展图表类型
                        itemStyle: {
                            normal: {label: {show: true}},
                            emphasis: {label: {show: true}}
                        },
                        data: data,
                        // 自定义名称映射
                        nameMap: {
                            'Central and Western': '中西区',
                            'Eastern': '东区',
                            'Islands': '离岛',
                            'Kowloon City': '九龙城',
                            'Kwai Tsing': '葵青',
                            'Kwun Tong': '观塘',
                            'North': '北区',
                            'Sai Kung': '西贡',
                            'Sha Tin': '沙田',
                            'Sham Shui Po': '深水埗',
                            'Southern': '南区',
                            'Tai Po': '大埔',
                            'Tsuen Wan': '荃湾',
                            'Tuen Mun': '屯门',
                            'Wan Chai': '湾仔',
                            'Wong Tai Sin': '黄大仙',
                            'Yau Tsim Mong': '油尖旺',
                            'Yuen Long': '元朗'
                        }
                    }
                ]
            };
            let chart = echarts.init($(".map")[0],"shine");
            chart.setOption(option);
            return {};
        }
    },
    {
        modelId: "10070"
    },
    {
        // url: "/display/data/zhwsxxzhjk/hlyyjc.json",
        title: "合理用药监测",
        templet: hlyyjc,
    },
    {
        modelId: "10040",
    },
    {
        title: "门诊医疗保险费用监测",
        title1: "住院医疗保险费用监测",
        templet: ylbxfyjc,
        position: {bottom: "3%"},
        renderInfo: function ({info}) {
            autoSetHtml(info, info.type);
        },
    },
    {
        title: "医疗质量监测(本年度)",
        templet: ylzljc,
        renderInfo: function ({info}) {
            $("#zyhzsws").html(decorate(info.zyhzsws));
        },
    },
    {
        templet: jyqyjc,
        modelId: "10200",
    },
];

layui.use("element", function () {
    layui.$(function () {
        let timer = setInterval(function () {
            $("#zy").toggleClass("hidden");
            $("#mz").toggleClass("show");
        }, 2000);
    });
});